<!-- include tpl=head title=$cate_rs.title menutitle=$page_rs.title -->
<!-- include file=bbs_content -->
<div class="main">
	<ul class="am-comments-list">
		<!-- if $pageid == 1 -->
		<li class="am-comment">
			<a href="{url ctrl=user id=$rs.user.id/}" title="查看{$rs.user.user}的主页"><img class="am-comment-avatar" alt="{$rs.user.nickname ? $rs.user.nickname : $rs.user.user}" src="{$rs.user.avatar ? $rs.user.avatar : 'images/avatar.gif'}" /></a>
			<div class="am-comment-main">
				<div class="am-comment-hd">
					
					<div class="am-comment-meta">
						{$rs.title}
						<a href="{url ctrl=user id=$rs.user.id/}" class="am-comment-author">{$rs.user.nickname ? $rs.user.nickname : $rs.user.user}</a>于 <time></time> 发布主题：<b></b>
					</div>
				</div>
				<div class="am-comment-bd">
					{$rs.content}
					<small class="am-fr gray">{func time_format $rs.dateline}</small>
					<small class="am-fl gray">楼主</small>
				</div>
			</div>
		</li>
		<!-- /if -->
		<!-- loop from=$comment.rslist key=$key value=$value id=tmpid -->
		<li class="am-comment">
			<a href="{url ctrl=user id=$value.uid.id/}" target="_blank">
				<img src="{$value.uid.avatar}" class="am-comment-avatar" width="48" height="48" />
			</a>
			<div class="am-comment-main">
				<div class="am-comment-hd">
					<div class="am-comment-meta">
						<a href="{url ctrl=user id=$value.uid.id/}" target="_blank" class="am-comment-author">{$value.uid.user}</a> 于 <time>{func time_format $value.addtime}</time> 回复
					</div>
				</div>
				<div class="am-comment-bd">
					{$value.content}
					<small class="am-fr gray">{$value._layer}</small>
				</div>
			</div>
		</li>
		<!-- if $value.adm_content && $value.adm_time -->
		<li class="am-comment am-comment-flip am-comment-highlight">
			<img src="images/adminer.png" class="am-comment-avatar" width="48" height="48" />
			<div class="am-comment-main">
				<div class="am-comment-hd">
					<div class="am-comment-meta">
						管理员回复于<time>{func time_format $value.adm_time}</time>
					</div>
				</div>
				<div class="am-comment-bd">
					{$value.adm_content}
				</div>
			</div>
		</li>
		<!-- /if -->
		<!-- /loop -->
		<!-- if $session.user_id -->
		
		
		<li class="am-comment">
			<img src="{$comment.avatar}" class="am-comment-avatar" width="48" height="48" />
			<div class="am-comment-main">
				<div class="am-comment-hd">
					<div class="am-comment-meta">
						提交新回复<!-- if $comment.total -->，当前已有 {$comment.total} 条回复<!-- /if -->
					</div>
				</div>
				<div class="am-comment-bd">
					<form method="post" id="comment-post" class="am-form">
						<input type="hidden" name="id" id="id" value="{$tid ? $tid : $rs.id}" />
						<!-- if $comment.uid -->
						<div class="am-form-group">{func form_edit comment $comment.content editor width=100%&height=150&btns[image]=1}</div>
						<!-- else -->
						<div class="am-form-group">
							<textarea rows="5" name="comment" id="comment" placeholder="填写评论信息" style="resize: none;"></textarea>
						</div>
						<!-- /if -->
						<!-- if $is_vcode -->
						<div class="am-g am-form-group am-g-collapse">
							<div class="am-u-sm-2"><input class="vcode"  type="text" name="_chkcode" id="_chkcode" placeholder="请填写验证码" /></div>
							<div class="am-u-sm-4" style="padding-left:10px;padding-top:5px;"><img src="" border="0" align="absmiddle" id="vcode" class="hand" /></div>
							<div class="am-u-sm-6"></div>
						</div>
						<script type="text/javascript">
						$(document).ready(function(){
							$("#vcode").phpok_vcode();
							$("#vcode").click(function(){
								$(this).phpok_vcode();
							});
						});
						</script>
						<!-- /if -->
						<div>
							<input name="" type="submit" class="am-btn am-btn-primary" value="提交" />
						</div>
					</form>
				</div>
			</div>
		</li>
		<!-- else -->
		<li class="am-comment">
			<img src="{$comment.avatar}" class="am-comment-avatar" width="48" height="48" />
			<div class="am-comment-main">
				<div class="am-comment-hd">
					<div class="am-comment-meta">
						提交新回复<!-- if $comment.total -->，当前已有 {$comment.total} 条回复<!-- /if -->
					</div>
				</div>
				<div class="am-comment-bd">
					<div style="padding:20px;text-align:center">请先 <a href="{url ctrl=login _back=$rs.url/}" title="会员登录">登录</a> 或 <a href="{url ctrl=register _back=$rs.url/}" title="新会员注册">注册</a></div>
				</div>
			</div>
		</li>
		<!-- /if -->
	</ul>
	<!-- include tpl=block/pagelist pageurl=$rs.url total=$comment.total pageid=$comment.pageid psize=$comment.psize -->
</div>
<!-- include tpl=foot -->